import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listFwgl(query) {
  return request({
    url: '/fwgl/form/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getFwgl(docunid) {
  return request({
    url: '/fwgl/form/' + docunid,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addFwgl(formData,submitData) {
  const data = {
    formData:formData,
    submitData:submitData
  }
  return request({
    url: '/fwgl/form/save',
    method: 'post',
    data: data,
  })
}

// 修改【请填写功能名称】
export function updateFwgl(data) {
  return request({
    url: '/fwgl/form/edit',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delFwgl(docunid) {
  return request({
    url: '/fwgl/form/' + docunid,
    method: 'delete'
  })
}

// 导出【请填写功能名称】
export function exportFwgl(query) {
  return request({
    url: '/fwgl/form/export',
    method: 'get',
    params: query
  })
}
// 上传【发文管理附件】
export function uploadFwglFiles(files) {
  return request({
    url: '/fwgl/form/upload',
    method: 'get',
    data: files
  })
}
// 删除附件【发文管理附件】
export function removeFwglFile(fileid) {
  return request({
    url: '/fwgl/form/removefile/'+fileid,
    method: 'get',
  })
}
// 获取附件信息列表
export function getFwglFiles(docunid){
  return request({
    url: '/fwgl/form/getfiles/' + docunid,
    method: 'get'
  })
}
// 判断打开表单的类型
export function judgeDocType(docUnid,taskId){
  return request({
    url: '/fwgl/form/judgeDocType?docUnid='+docUnid+'&taskId='+taskId,
    method: 'get',
  })
}
